Bentley Map V8i (SELECTseries 10) Help

Loop Scripts

Sometimes it is useful to execute the same piece of code several times. It is possible to use the FOR loop.

Syntax:

FOR ( init_assign ; condition ; inc_assign )
commands
END

Before the FOR-END loop is executed the “init_assign” assignment is executed.

Note: It is possible to omit the “init_assign” part if not needed

The commands in the FOR-END block are then executed. After that the “inc_assign” assignment is executed.

Before each loop the condition is evaluated; the loop is repeated only as long as the condition evaluates to true.

Note: If the initial condition (after having executed the init_assign statement) evaluates to false, the loop is never entered

Example:



This script places a circle with a radius of 1 at each vertex of the element.